package booroo.basic;

public class J10_Oop {

	public static void main(String[] args) {
		// OOP기본 - 클래스 작성
		// 클래스를 이용해서 객체를 생성하려면
		// new 연산자와 생성자를 사용
		// 또한 생성된 객체를 변수화하려면
		// 객체와 동일한 자료형으로 선언
		// 개체화
		// stud, depart, subj, prof는
		// 각각 인스턴스 변수임
		J10Student stud = new J10Student();
		J10Department depart = new J10Department();
		J10Subject subj = new J10Subject();
		J10Professor prof = new J10Professor();
		
		stud.hakbun = "201350050";
		stud.name = "김태희";
		stud.addr = "경기도 고양시";
		stud.birth = "1985.3.22";
		stud.depart = "컴퓨터";
		stud.prof = "504";
		System.out.println(stud.hakbun);
		System.out.println(stud.name);
		System.out.println(stud.addr);
		System.out.println(stud.birth);
		System.out.println(stud.depart);
		System.out.println(stud.prof);
		depart.departName = "컴퓨터공학";
		depart.departPhone = "123-4567-8901";
		depart.departLocation = "E동 2층";
		depart.departChief = "504";
		System.out.println(depart.departName);
		System.out.println(depart.departPhone);
		System.out.println(depart.departLocation);
		System.out.println(depart.departChief);
		subj.subNum = "0205";
		subj.subName = "프로그래밍";
		subj.subSummary = "자바 프로그래밍";
		subj.subProf = "301";
		System.out.println(subj.subNum);
		System.out.println(subj.subName);
		System.out.println(subj.subSummary);
		System.out.println(subj.subProf);
		prof.profNum = "301";
		prof.profName = "이순신";
		prof.profMajor = "프로그래밍";
		System.out.println(prof.profNum);
		System.out.println(prof.profName);
		System.out.println(prof.profMajor);
	} // main

} // class

class J10Student {
	// 필드, 멤버변수
	String hakbun;
	String name;
	String addr;
	String birth;
	String depart;
	String prof;
	// 생성자
	public J10Student() {
		}
	} // Student

class J10Department {
	String departName;
	String departPhone;
	String departLocation;
	String departChief;
	public J10Department() {
		}
	} // Department

class J10Subject {
	String subNum;
	String subName;
	String subSummary;
	String subProf;
	public J10Subject() {
		}
	} // Subject

class J10Professor {
	String profNum;
	String profName;
	String profMajor;
	public J10Professor() {
		}
	} // Professor
